package br.ufrj.dcc.comp2.musica.vista;

import java.awt.Component;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.Insets;

import javax.swing.JComboBox;
import javax.swing.JLabel;
import javax.swing.JPanel;

public class PainelAdicionarDisciplina extends JPanel {
	private JLabel labelDisciplina = new JLabel("Disciplina:");
	private JLabel labelCurso = new JLabel("Curso:");
	
	private JComboBox comboDisciplina = new JComboBox();
	private JComboBox comboCurso = new JComboBox();
	

	
	private GridBagLayout gridBagLayout = new GridBagLayout();
	private GridBagConstraints gridBagConstraints = new GridBagConstraints();
	
	public PainelAdicionarDisciplina() {
		setLayout(gridBagLayout);

		adicionar(labelDisciplina, 1, 0);
		adicionar(labelCurso, 1, 1);
		
		adicionar(comboDisciplina, 3, 0);
		adicionar(comboCurso, 3, 1);
		
	}
	
	public void adicionar(Component c, int x, int y) {
		gridBagConstraints.fill = GridBagConstraints.HORIZONTAL;
		gridBagConstraints.insets = new Insets(10, 10, 10, 10);
		gridBagConstraints.gridx = x;
		gridBagConstraints.gridy = y;
		gridBagConstraints.ipady = 3;
		
		add(c, gridBagConstraints);
	}
	
	public void adicionar(Component c, int x, int y, int fill) {
		gridBagConstraints.fill = fill;
		gridBagConstraints.gridx = x;
		gridBagConstraints.gridy = y;
		gridBagConstraints.ipady = 3;
		
		add(c, gridBagConstraints);
	}

	public JComboBox getComboDisciplina() {
		return comboDisciplina;
	}

	public JComboBox getComboCurso() {
		return comboCurso;
	}

	public void setComboDisciplina(JComboBox comboDisciplina) {
		this.comboDisciplina = comboDisciplina;
	}

	public void setComboCurso(JComboBox comboCurso) {
		this.comboCurso = comboCurso;
	}
}
